home *** CD-ROM | disk | FTP | other *** search
- Path: prodigy.com!usenet
- From: GQXN85A@prodigy.com (Richard Orlando)
- Newsgroups: comp.lang.c
- Subject: Re: help with a simple c routine
- Date: 16 Apr 1996 03:18:06 GMT
- Organization: Prodigy Services Company 1-800-PRODIGY
- Distribution: world
- Message-ID: <4kv3he$14f4@usenetp1.news.prodigy.com>
- References: <4kin72$ns5@pelican.cs.ucla.edu> <4kjqcu$794@pelican.cs.ucla.edu>
- NNTP-Posting-Host: innugap3-int.news.prodigy.com
- X-Newsreader: Version 1.2
-
- >
- >Hi all
- >
- >I am trying to write a simple c routine that gets rid of all the .. or .
-
- >in dir paths like somehting/../.. or somedir/./something type
- >
- >so let's say I ahve the follwoing paths
- >
- >/home/jlz/../jlz
- >
- >after parsing it I should have
- >
- >/home/jlz
- >
- >or
- >
- >/home/./jlz
- >
- >it becomes
- >
- >/home/jlz
- >
- >I can't think of an easy way of doing this. Please help!
- >
- >thanks very much
-
- Look in the strings.h header file. There are string functions that will
- help you pull out the "..".
-
-